home *** CD-ROM | disk | FTP | other *** search
/ My Neighborhood / My Neighborhood.iso / mac / MacFiles / ExitPrk4.Dxr / 00020.ls < prev    next >
Encoding:
Text File  |  1997-11-21  |  3.1 KB  |  73 lines

  1. on getNextGroup
  2.   global wagonList, wagonPos
  3.   if count(wagonList) = 1 then
  4.     set the castNum of sprite 13 to the number of cast "left wheel dark"
  5.     set the castNum of sprite 14 to the number of cast "right wheel dark"
  6.     set the castNum of sprite 7 to the number of cast getAt(wagonList, wagonPos)
  7.     set the locV of sprite 8 to -100
  8.     set the locV of sprite 9 to -100
  9.   else
  10.     if count(wagonList) = 2 then
  11.       set the castNum of sprite 13 to the number of cast "left wheel dark"
  12.       set the castNum of sprite 14 to the number of cast "right wheel dark"
  13.       set the castNum of sprite 7 to the number of cast getAt(wagonList, wagonPos)
  14.       set the castNum of sprite 8 to the number of cast getAt(wagonList, wagonPos + 1)
  15.       set the locV of sprite 9 to -100
  16.     else
  17.       if count(wagonList) = 3 then
  18.         set the castNum of sprite 13 to the number of cast "left wheel dark"
  19.         set the castNum of sprite 14 to the number of cast "right wheel dark"
  20.         set the castNum of sprite 7 to the number of cast getAt(wagonList, wagonPos)
  21.         set the castNum of sprite 8 to the number of cast getAt(wagonList, wagonPos + 1)
  22.         set the castNum of sprite 9 to the number of cast getAt(wagonList, wagonPos + 2)
  23.       else
  24.         repeat with u = 7 to 9
  25.           set the castNum of sprite u to the number of cast getAt(wagonList, wagonPos)
  26.           set wagonPos to wagonPos + 1
  27.           if wagonPos > count(wagonList) then
  28.             set wagonPos to 1
  29.           end if
  30.         end repeat
  31.       end if
  32.     end if
  33.   end if
  34.   updateStage()
  35. end
  36.  
  37. on getPrevGroup
  38.   global wagonList, wagonPos
  39.   if count(wagonList) = 1 then
  40.     set the castNum of sprite 13 to the number of cast "left wheel dark"
  41.     set the castNum of sprite 14 to the number of cast "right wheel dark"
  42.     set the castNum of sprite 7 to the number of cast getAt(wagonList, wagonPos)
  43.     set the locV of sprite 7 to 75
  44.     set the locV of sprite 8 to -100
  45.     set the locV of sprite 9 to -100
  46.   else
  47.     if count(wagonList) = 2 then
  48.       set the castNum of sprite 13 to the number of cast "left wheel dark"
  49.       set the castNum of sprite 14 to the number of cast "right wheel dark"
  50.       set the castNum of sprite 7 to the number of cast getAt(wagonList, wagonPos)
  51.       set the castNum of sprite 8 to the number of cast getAt(wagonList, wagonPos + 1)
  52.       set the locV of sprite 9 to -100
  53.     else
  54.       if count(wagonList) = 3 then
  55.         set the castNum of sprite 13 to the number of cast "left wheel dark"
  56.         set the castNum of sprite 14 to the number of cast "right wheel dark"
  57.         set the castNum of sprite 7 to the number of cast getAt(wagonList, wagonPos)
  58.         set the castNum of sprite 8 to the number of cast getAt(wagonList, wagonPos + 1)
  59.         set the castNum of sprite 9 to the number of cast getAt(wagonList, wagonPos + 2)
  60.       else
  61.         repeat with u = 7 to 9
  62.           set the castNum of sprite u to the number of cast getAt(wagonList, wagonPos)
  63.           set wagonPos to wagonPos - 1
  64.           if wagonPos < 1 then
  65.             set wagonPos to count(wagonList)
  66.           end if
  67.         end repeat
  68.       end if
  69.     end if
  70.   end if
  71.   updateStage()
  72. end
  73.